package io.acna.basedao.mybatis.exception;

import java.io.Serializable;

public class BaseException extends RuntimeException implements Serializable {

	private int errorCode;
	private int httpStatus;
	private Object attachData;

	public BaseException() {
		super();
	}

	public BaseException(int errorCode, int httpStatus, String message,
			Object attachData) {
		super(message);
		this.errorCode = errorCode;
		this.httpStatus = httpStatus;
		this.attachData = attachData;
	}

	public BaseException(int errorCode) {
		super();
		this.errorCode = errorCode;
	}

	public BaseException(String message, int errorCode) {
		super(message);
		this.errorCode = errorCode;
	}

	public int getErrorCode() {
		return errorCode;
	}

	public void setErrorCode(int errorCode) {
		this.errorCode = errorCode;
	}

	public int getHttpStatus() {
		return httpStatus;
	}

	public void setHttpStatus(int httpStatus) {
		this.httpStatus = httpStatus;
	}

	public Object getAttachData() {
		return attachData;
	}

	public void setAttachData(Object attachData) {
		this.attachData = attachData;
	}

}
